package com.pro.framework.api.model;

import com.pro.framework.api.enums.ThirdErrorType;
import lombok.Getter;

@Getter
public class ThirdException extends RuntimeException implements IFrameworkException{

    private final String platform;
    private final ThirdErrorType type;
    private final String msg;

    public ThirdException(String platform, ThirdErrorType type, String msg, Throwable cause) {
        super(type.getLabel(), cause);
        this.platform = platform;
        this.type = type;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return 500;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public Object[] getParams() {
        return new Object[0];
    }
}
